3.82 \(\int \frac{(d+e x) (a+b \log (c x^n))^2}{x^4} \, dx\)

Optimal. Leaf size=109 \[ -\frac{2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac{b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac{2 b^2 d n^2}{27 x^3}-\frac{b^2 e n^2}{4 x^2} \]

[Out]

(-2*b^2*d*n^2)/(27*x^3) - (b^2*e*n^2)/(4*x^2) - (2*b*d*n*(a + b*Log[c*x^n]))/(9*x^3) - (b*e*n*(a + b*Log[c*x^n
]))/(2*x^2) - (d*(a + b*Log[c*x^n])^2)/(3*x^3) - (e*(a + b*Log[c*x^n])^2)/(2*x^2)

________________________________________________________________________________________

Rubi [A]  time = 0.133212, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {2353, 2305, 2304} \[ -\frac{2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac{b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac{2 b^2 d n^2}{27 x^3}-\frac{b^2 e n^2}{4 x^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + e*x)*(a + b*Log[c*x^n])^2)/x^4,x]

[Out]

(-2*b^2*d*n^2)/(27*x^3) - (b^2*e*n^2)/(4*x^2) - (2*b*d*n*(a + b*Log[c*x^n]))/(9*x^3) - (b*e*n*(a + b*Log[c*x^n
]))/(2*x^2) - (d*(a + b*Log[c*x^n])^2)/(3*x^3) - (e*(a + b*Log[c*x^n])^2)/(2*x^2)

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol]
:> With[{u = ExpandIntegrand[(a + b*Log[c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[
{a, b, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0] && IntegerQ[m] && IntegerQ[r
]))

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2304

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Log[c*x^
n]))/(d*(m + 1)), x] - Simp[(b*n*(d*x)^(m + 1))/(d*(m + 1)^2), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rubi steps

\begin{align*} \int \frac{(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx &=\int \left (\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{x^4}+\frac{e \left (a+b \log \left (c x^n\right )\right )^2}{x^3}\right ) \, dx\\ &=d \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x^4} \, dx+e \int \frac{\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx\\ &=-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac{e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}+\frac{1}{3} (2 b d n) \int \frac{a+b \log \left (c x^n\right )}{x^4} \, dx+(b e n) \int \frac{a+b \log \left (c x^n\right )}{x^3} \, dx\\ &=-\frac{2 b^2 d n^2}{27 x^3}-\frac{b^2 e n^2}{4 x^2}-\frac{2 b d n \left (a+b \log \left (c x^n\right )\right )}{9 x^3}-\frac{b e n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac{d \left (a+b \log \left (c x^n\right )\right )^2}{3 x^3}-\frac{e \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}\\ \end{align*}

Mathematica [A]  time = 0.057317, size = 82, normalized size = 0.75 \[ -\frac{36 d \left (a+b \log \left (c x^n\right )\right )^2+8 b d n \left (3 a+3 b \log \left (c x^n\right )+b n\right )+54 e x \left (a+b \log \left (c x^n\right )\right )^2+27 b e n x \left (2 a+2 b \log \left (c x^n\right )+b n\right )}{108 x^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + e*x)*(a + b*Log[c*x^n])^2)/x^4,x]

[Out]

-(36*d*(a + b*Log[c*x^n])^2 + 54*e*x*(a + b*Log[c*x^n])^2 + 27*b*e*n*x*(2*a + b*n + 2*b*Log[c*x^n]) + 8*b*d*n*
(3*a + b*n + 3*b*Log[c*x^n]))/(108*x^3)

________________________________________________________________________________________

Maple [C]  time = 0.208, size = 1486, normalized size = 13.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)*(a+b*ln(c*x^n))^2/x^4,x)

[Out]

-1/6*b^2*(3*e*x+2*d)/x^3*ln(x^n)^2-1/18*(9*I*Pi*b^2*e*x*csgn(I*x^n)*csgn(I*c*x^n)^2-9*I*Pi*b^2*e*x*csgn(I*x^n)
*csgn(I*c*x^n)*csgn(I*c)-9*I*Pi*b^2*e*x*csgn(I*c*x^n)^3+9*I*Pi*b^2*e*x*csgn(I*c*x^n)^2*csgn(I*c)+18*ln(c)*b^2*
e*x+9*b^2*e*n*x+18*a*b*e*x+6*I*Pi*b^2*d*csgn(I*x^n)*csgn(I*c*x^n)^2-6*I*Pi*b^2*d*csgn(I*x^n)*csgn(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*I*Pi*b^2*d*n*csgn(I*x^n)*csgn(I*c*x^n)^2-72*Pi^2*b^2*d*csgn(I*x^n)
*csgn(I*c*x^n)^4*csgn(I*c))/x^3

________________________________________________________________________________________

Maxima [A]  time = 1.10645, size = 204, normalized size = 1.87 \begin{align*} -\frac{1}{4} \, b^{2} e{\left (\frac{n^{2}}{x^{2}} + \frac{2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} - \frac{2}{27} \, b^{2} d{\left (\frac{n^{2}}{x^{3}} + \frac{3 \, n \log \left (c x^{n}\right )}{x^{3}}\right )} - \frac{b^{2} e \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac{a b e n}{2 \, x^{2}} - \frac{a b e \log \left (c x^{n}\right )}{x^{2}} - \frac{b^{2} d \log \left (c x^{n}\right )^{2}}{3 \, x^{3}} - \frac{2 \, a b d n}{9 \, x^{3}} - \frac{a^{2} e}{2 \, x^{2}} - \frac{2 \, a b d \log \left (c x^{n}\right )}{3 \, x^{3}} - \frac{a^{2} d}{3 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x^4,x, algorithm="maxima")

[Out]

-1/4*b^2*e*(n^2/x^2 + 2*n*log(c*x^n)/x^2) - 2/27*b^2*d*(n^2/x^3 + 3*n*log(c*x^n)/x^3) - 1/2*b^2*e*log(c*x^n)^2
/x^2 - 1/2*a*b*e*n/x^2 - a*b*e*log(c*x^n)/x^2 - 1/3*b^2*d*log(c*x^n)^2/x^3 - 2/9*a*b*d*n/x^3 - 1/2*a^2*e/x^2 -
 2/3*a*b*d*log(c*x^n)/x^3 - 1/3*a^2*d/x^3

________________________________________________________________________________________

Fricas [A]  time = 1.03898, size = 454, normalized size = 4.17 \begin{align*} -\frac{8 \, b^{2} d n^{2} + 24 \, a b d n + 36 \, a^{2} d + 18 \,{\left (3 \, b^{2} e x + 2 \, b^{2} d\right )} \log \left (c\right )^{2} + 18 \,{\left (3 \, b^{2} e n^{2} x + 2 \, b^{2} d n^{2}\right )} \log \left (x\right )^{2} + 27 \,{\left (b^{2} e n^{2} + 2 \, a b e n + 2 \, a^{2} e\right )} x + 6 \,{\left (4 \, b^{2} d n + 12 \, a b d + 9 \,{\left (b^{2} e n + 2 \, a b e\right )} x\right )} \log \left (c\right ) + 6 \,{\left (4 \, b^{2} d n^{2} + 12 \, a b d n + 9 \,{\left (b^{2} e n^{2} + 2 \, a b e n\right )} x + 6 \,{\left (3 \, b^{2} e n x + 2 \, b^{2} d n\right )} \log \left (c\right )\right )} \log \left (x\right )}{108 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x^4,x, algorithm="fricas")

[Out]

-1/108*(8*b^2*d*n^2 + 24*a*b*d*n + 36*a^2*d + 18*(3*b^2*e*x + 2*b^2*d)*log(c)^2 + 18*(3*b^2*e*n^2*x + 2*b^2*d*
n^2)*log(x)^2 + 27*(b^2*e*n^2 + 2*a*b*e*n + 2*a^2*e)*x + 6*(4*b^2*d*n + 12*a*b*d + 9*(b^2*e*n + 2*a*b*e)*x)*lo
g(c) + 6*(4*b^2*d*n^2 + 12*a*b*d*n + 9*(b^2*e*n^2 + 2*a*b*e*n)*x + 6*(3*b^2*e*n*x + 2*b^2*d*n)*log(c))*log(x))
/x^3

________________________________________________________________________________________

Sympy [B]  time = 2.28761, size = 306, normalized size = 2.81 \begin{align*} - \frac{a^{2} d}{3 x^{3}} - \frac{a^{2} e}{2 x^{2}} - \frac{2 a b d n \log{\left (x \right )}}{3 x^{3}} - \frac{2 a b d n}{9 x^{3}} - \frac{2 a b d \log{\left (c \right )}}{3 x^{3}} - \frac{a b e n \log{\left (x \right )}}{x^{2}} - \frac{a b e n}{2 x^{2}} - \frac{a b e \log{\left (c \right )}}{x^{2}} - \frac{b^{2} d n^{2} \log{\left (x \right )}^{2}}{3 x^{3}} - \frac{2 b^{2} d n^{2} \log{\left (x \right )}}{9 x^{3}} - \frac{2 b^{2} d n^{2}}{27 x^{3}} - \frac{2 b^{2} d n \log{\left (c \right )} \log{\left (x \right )}}{3 x^{3}} - \frac{2 b^{2} d n \log{\left (c \right )}}{9 x^{3}} - \frac{b^{2} d \log{\left (c \right )}^{2}}{3 x^{3}} - \frac{b^{2} e n^{2} \log{\left (x \right )}^{2}}{2 x^{2}} - \frac{b^{2} e n^{2} \log{\left (x \right )}}{2 x^{2}} - \frac{b^{2} e n^{2}}{4 x^{2}} - \frac{b^{2} e n \log{\left (c \right )} \log{\left (x \right )}}{x^{2}} - \frac{b^{2} e n \log{\left (c \right )}}{2 x^{2}} - \frac{b^{2} e \log{\left (c \right )}^{2}}{2 x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*ln(c*x**n))**2/x**4,x)

[Out]

-a**2*d/(3*x**3) - a**2*e/(2*x**2) - 2*a*b*d*n*log(x)/(3*x**3) - 2*a*b*d*n/(9*x**3) - 2*a*b*d*log(c)/(3*x**3)
- a*b*e*n*log(x)/x**2 - a*b*e*n/(2*x**2) - a*b*e*log(c)/x**2 - b**2*d*n**2*log(x)**2/(3*x**3) - 2*b**2*d*n**2*
log(x)/(9*x**3) - 2*b**2*d*n**2/(27*x**3) - 2*b**2*d*n*log(c)*log(x)/(3*x**3) - 2*b**2*d*n*log(c)/(9*x**3) - b
**2*d*log(c)**2/(3*x**3) - b**2*e*n**2*log(x)**2/(2*x**2) - b**2*e*n**2*log(x)/(2*x**2) - b**2*e*n**2/(4*x**2)
 - b**2*e*n*log(c)*log(x)/x**2 - b**2*e*n*log(c)/(2*x**2) - b**2*e*log(c)**2/(2*x**2)

________________________________________________________________________________________

Giac [B]  time = 1.25368, size = 278, normalized size = 2.55 \begin{align*} -\frac{54 \, b^{2} n^{2} x e \log \left (x\right )^{2} + 54 \, b^{2} n^{2} x e \log \left (x\right ) + 108 \, b^{2} n x e \log \left (c\right ) \log \left (x\right ) + 36 \, b^{2} d n^{2} \log \left (x\right )^{2} + 27 \, b^{2} n^{2} x e + 54 \, b^{2} n x e \log \left (c\right ) + 54 \, b^{2} x e \log \left (c\right )^{2} + 24 \, b^{2} d n^{2} \log \left (x\right ) + 108 \, a b n x e \log \left (x\right ) + 72 \, b^{2} d n \log \left (c\right ) \log \left (x\right ) + 8 \, b^{2} d n^{2} + 54 \, a b n x e + 24 \, b^{2} d n \log \left (c\right ) + 108 \, a b x e \log \left (c\right ) + 36 \, b^{2} d \log \left (c\right )^{2} + 72 \, a b d n \log \left (x\right ) + 24 \, a b d n + 54 \, a^{2} x e + 72 \, a b d \log \left (c\right ) + 36 \, a^{2} d}{108 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)*(a+b*log(c*x^n))^2/x^4,x, algorithm="giac")

[Out]

-1/108*(54*b^2*n^2*x*e*log(x)^2 + 54*b^2*n^2*x*e*log(x) + 108*b^2*n*x*e*log(c)*log(x) + 36*b^2*d*n^2*log(x)^2
+ 27*b^2*n^2*x*e + 54*b^2*n*x*e*log(c) + 54*b^2*x*e*log(c)^2 + 24*b^2*d*n^2*log(x) + 108*a*b*n*x*e*log(x) + 72
*b^2*d*n*log(c)*log(x) + 8*b^2*d*n^2 + 54*a*b*n*x*e + 24*b^2*d*n*log(c) + 108*a*b*x*e*log(c) + 36*b^2*d*log(c)
^2 + 72*a*b*d*n*log(x) + 24*a*b*d*n + 54*a^2*x*e + 72*a*b*d*log(c) + 36*a^2*d)/x^3